From 7bc3fa8ada27334f7f93196dd9152d9972f67d7d Mon Sep 17 00:00:00 2001 From: "emellor@leeni.uk.xensource.com" Date: Tue, 23 May 2006 16:17:28 +0100 Subject: [PATCH] Fix log message written when xenstored corrupts its store. Signed-off-by: Ewan Mellor --- tools/xenstore/xenstored_core.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tools/xenstore/xenstored_core.c b/tools/xenstore/xenstored_core.c index 5c08934cdb..ec31977cdd 100644 --- a/tools/xenstore/xenstored_core.c +++ b/tools/xenstore/xenstored_core.c @@ -451,6 +451,11 @@ static struct node *read_node(struct connection *conn, const char *name) static bool write_node(struct connection *conn, const struct node *node) { + /* + * conn will be null when this is called from manual_node. + * tdb_context copes with this. + */ + TDB_DATA key, data; void *p; @@ -478,7 +483,7 @@ static bool write_node(struct connection *conn, const struct node *node) /* TDB should set errno, but doesn't even set ecode AFAICT. */ if (tdb_store(tdb_context(conn), key, data, TDB_REPLACE) != 0) { - corrupt(conn, "Write of %s = %s failed", key, data); + corrupt(conn, "Write of %s failed", key.dptr); goto error; } return true; -- 2.30.2